<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.dt.global.utils.Proerties"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="px" uri="/WEB-INF/tld/pex.tld"%>
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld"%>
<%@ taglib prefix="fn" uri="/WEB-INF/tld/fn.tld"%>
<%
	String path = request.getContextPath();
	Proerties popUtil = new Proerties();
	String url = popUtil.getValue("wjrdht");
	String url1 = popUtil.getValue("wjrdxt");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>温江人大代表之家</title>
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/js/main.js"></script>
<script type="text/javascript" src="<%=path%>/js/pex.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery1.4.2.js"></script>
<script type="text/javascript">
 $(function(){
        //作者
		var author = $("#author").val();
		if(author.length>1){
			$("#zuozhe").show();
		}else{
			$("#zuozhe").hide();
		}
		//附件
		var attaNamehid=$("#attaNamehid").val();
		var attachmenthid=$("#attachmenthid").val();
		if(attaNamehid!=""){
		 $("#fujiaolab").html(attaNamehid);
		 if(attachmenthid!=""){
			 document.getElementById("fajianhref").href=attachmenthid;
			  document.getElementById("fujian").style.display='inline';
		  }
	      } 
		//视频
		 var viewAddresshid=$("#viewAddresshid").val();
		 var viewNamehid=$("#viewNamehid").val();
		 if(viewAddresshid !=""&&viewNamehid !=""){
			 $("#shiping").show();
		 }else{
			 $("#shiping").hide();
		 }
	 //新闻名称加载
	 var path = document.getElementById("path").value+"/";
	     var pid=document.getElementById("pid").value;
	    		 $.post("<%=path%>/zjdselectNews/selectNidChannel.do",{pid:pid},function(data){
	  		          if(data!=null&&data.length>0){
	  		          var html="";
    		           $(data).each(function(i){
    		           		html=html+"<tr><td align='left'>&nbsp;&nbsp;&nbsp;&nbsp;<img src='"+path+"images/arrow.gif' align='absmiddle' /><a href='"+path+"zhengymquery/picarticleQuery.do?channelId="+this.channelId+"&pid="+pid+"'> "+this.name+"</a></td></tr>";
    		           });
    		          $("#xwmcquery").html(html);
	  		          }
	  		            document.getElementById("xwmctishi").style.display = "none";
		   			},"json");
	       //小组活动加载
			 $.post("<%=path%>/selectchannel/selectChannel.do",{pid:'08'},function(data){
	  		          if(data!=null&&data.length>0){
	  		          var html="<tr>";
    		           $(data).each(function(i){
    		        	   if(i!=0&&i%2==0){
    		        		   html=html+"</tr><tr><td style='background-color:#ffd8d8; border:1px solid #FF6600; text-align:center; width:80px'><a  href='"+path+"zhengymquery/initIndex.do?pid="+this.pid+"' target='_blank' >"+this.name+"</a></td>";
    		        	   }else{
    		        		   html=html+"<td style='background-color:#ffd8d8; border:1px solid #FF6600; text-align:center; width:80px'><a href='"+path+"zhengymquery/initIndex.do?pid="+this.pid+"' target='_blank'>"+this.name+"</a></td>";
    		        	   }
    		           });
    		           html=html+"</tr>";
    		          $("#jczlquery").html(html);
	  		          }
	  		          document.getElementById("jczltishi").style.display = "none";
		   			},"json");
 });
		$(function(){
	     	   	var path=document.getElementById("path").value+"/";
		        var pid=document.getElementById("pid").value;
		        var url1=document.getElementById("url1").value;
		        	//加载头部栏目
		 $.post("<%=path%>/selectChannel/getTWebCoreChannelZhengjd.do",{pid:pid},function(data){
	  		          if(data!=null&&data.length>0){
	  		          var html="";
    		           $(data).each(function(i){
    		        	     html=html+""+this.qita+"<a href='"+path+""+this.dizhi+""+this.channelId+"&pid="+pid+"' target='_parent'>"+this.name+"</a>";
    		        	     if(this.name=='代表风采'){
    		        	    	html=html+"&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;<a href='"+url1+"' target='_blank'>代表履职</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;<a href='"+path+"zhengymquery/articlejczlPageQuery.do?channelId="+this.channelId+"&pid="+this.pid+"'>小组活动</a>";
    		        	      }
    		        	  if(i!=data.length-1){
    		        		 html=html+"&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp; ";
    		        	  }
    		           });
    		          $("#channel").html(html);
	  		          }
		   			},"json");
			})
 //回车事件
	function Keypress(event){
	 var event=window.event?window.event:event; 
	 if(event.keyCode==13){
	 	if($("#tishi").val().length<1){
			alert("请输入查询标题");
			return;
			}
		document.getElementById("textfield").value=$("#tishi").val();
        $("#selInfo").submit();
      } 
  }
  
 //搜索
   function sous(){
			if($("#tishi").val().length<1){
			alert("请输入查询标题");
			return;
			}
			document.getElementById("textfield").value=$("#tishi").val();
			$("#selInfo").submit();
		};
</script>
  </head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:10px">
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="410"><img src='${topimage}' width="410" height="88" /></td>
        <td><table border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td align="right"><img src="<%=path%>/images/searchIco.png" width="26" height="24" /></td>
            <td align="center" style="background-image:url(<%=path%>/images/searchBg.png); width:140px"><input type="text" id="tishi" onkeydown="Keypress(event)" style="width:130px; border:0px; margin:0px; background-image:url(<%=path%>/images/searchBg.png); background-position: 0 -3px;" /></td>
            <td align="center"><img id="suos" onclick="javascript:sous();" src="<%=path%>/images/searchBtn.png" width="67" height="24" align="absmiddle" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><img src="<%=path%>/images/header.png" width="967" height="210" /></td>
  </tr>
  <tr>
    <td align="center" style="background-image:url(<%=path%>/images/menuBg.png); height:39px; width:967px"><span class="p14 color2" style="font-weight:bold"><a href="<%=path%>/zhengymquery/initIndex.do?pid=${pid}" target="_parent">首页</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;<span id="channel"></span></span></td>
  </tr>
</table>
<div id="content">
  <table border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:7px">
    <tr>
      <td width="237" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="sailBox2_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="sailBox2_title_txt" id="nonid">${channel.name}</td>
              <td class="sailBox2_title_more">&nbsp;</td>
            </tr>
          </table></td>
        </tr>
        <tr>
        <td class="sailBox2_cont"><table border="0" align="center" cellpadding="0" cellspacing="2" class="pageColumn">
        <tr id="wjgzxyw" style="display: none"><td align="left">&nbsp;&nbsp;&nbsp;&nbsp;<img src="<%=path%>/images/arrow.gif" align="absmiddle" /><a href="http://www.wenjiang.gov.cn/" target="_blank">&nbsp;温江公众信息网</a></td></tr>
            <!-- 新闻名称加载 -->
               <tr id="xwmctishi">
              				<td align="center" bgcolor="#F4F4F4">
              					<img src='<%=path%>/images/loading/x-large-loading.gif' 
              						width='25' height='25' align='absmiddle'/>
              					<span class="gray">加载中...</span>
              				</td>
              			</tr>
                <tbody id="xwmcquery"></tbody>
            </table></td>
        </tr>
      </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:7px">
               <tr>
            <td class="sailBox2_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="sailBox2_title_txt">小组活动</td>
                <td class="sailBox2_title_more">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td class="sailBox2_cont"><table border="0" align="center" cellpadding="5" cellspacing="5">
                <!-- 基层专栏加载 -->
               <tr id="jczltishi">
              				<td align="center" bgcolor="#F4F4F4">
              					<img src='<%=path%>/images/loading/x-large-loading.gif' 
              						width='25' height='25' align='absmiddle'/>
              					<span class="gray">加载中...</span>
              				</td>
              			</tr>
              			  <tbody id="jczlquery"></tbody>
            </table></td>
          </tr>
        </table></td>
      <td style="width:8px"></td>
      <td width="722" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="sailBox_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="sailBox_title_txt">${channel.name}</td>
              <td align="right" class="sailBox_title_more" id="pidparent">当前位置：首页 -&gt;${channel.parent }</td>
              <td align="right" class="sailBox_title_more" id="nidname" style="display: none">当前位置：首页 -&gt;${channel.name }</td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="220" class="sailBox_cont"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="idxList">
            <tr>
              <th>${article.title}</th>
            </tr>
            <tr>
            <td style="line-height:2em; padding:20px;">
              ${article.artiContent}
           </td>
            </tr>
            <tr id="shiping" style="display: none;">
             <td>
            <div id="video">
            <div id="a1"  align="center"></div></div>
            <script type="text/javascript" src="<%=path%>/ckplayer/ckplayer.js" charset="utf-8"></script>
            <script type="text/javascript">
            var ii='${article.viewAddress}';
	        var flashvars={
		    f:ii,
		    c:1,
		    b:1
		    };
	       var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'};
	       CKobject.embedSWF('../ckplayer/ckplayer.swf','a1','ckplayer_a1','600','400',flashvars,params);
           </script>
           </td>
            </tr>
                <tr id="fujian" style="display: none;"><Td height="40" align="left">附件:<a id="fajianhref" href="#"><span id="fujiaolab"></span></a></Td></tr>
           <tr><Td align="left"><a href="//${article.exlink}" target="_blank">${article.exlink}</a></Td></tr>
           <tr id="zuozhe"><Td align="right"><strong>[作者：${article.author}]</strong></Td></tr>
             <tr>
              <td align="center"><a href="javascript:history.back();"><img src="<%=path%>/images/btn_back.gif" width="60" height="22" /></a></td>
            </tr>
          </table>
          </td>
        </tr>
      </table></td>
    </tr>
  </table>
</div>
<input type="hidden" value="${article.author}" id="author" />
<input type="hidden" value="${article.exlink}" id="exlink" />
<!-- 附件名称 -->
<input type="hidden" value="${article.attaName}" id="attaNamehid"/>
<!-- 附件地址 -->
<input type="hidden" value="${article.attachment}" id="attachmenthid"/>
<!-- 视频名称 -->
<input type="hidden" value="${article.viewName}" id="viewNamehid"/>
<!-- 视频地址 -->
<input type="hidden" value="${article.viewAddress}" id="viewAddresshid"/>
<!-- 栏目pid -->
<input type="hidden" value="${channel.pid}"  id="pidhid"/>
<!-- 栏目nid -->
<input type="hidden" value="${channel.nid}"  id="nidhid"/>
<input type="hidden" value="<%=path%>" id="path"/>
    <input type="hidden" value="<%=url1%>" id="url1"/>
   <input type="hidden" value="${pid}" id="pid"/>
<div style="text-align:center">
<iframe src="<%=path%>/query/footer.do" width="970px" height="100" frameborder="0" scrolling="no" name="footer"></iframe>
</div>
<form action="<%=path%>/article/getsearchPageQuery.do" id="selInfo" method="post">
  <input type="hidden" name="title" id="textfield"/>
  <input type="hidden" value="${pid}" id="pid" name="pid"/>
  </form>
</body>
</html>
